<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Ajax功能演示</title>
    <script type="javascript" src="js/jquery-3.4.1.min.js"></script>
</head>
<body>
<h1>Ajax功能演示</h1>
<input id="btn" type="button" value="Ajax测试">
<script type="text/javascript">
    $("#btn").click(function () {
        $.ajax({
            type: "GET",
            url: "ajax",
            dataType: "json",
            success: function (result) {
                console.log(result.message);
            }
        });
    });
</script>
</body>
</html>